package com.chencs.common;

import org.mybatis.spring.annotation.MapperScan;
import org.springframework.boot.SpringApplication;
import org.springframework.boot.autoconfigure.SpringBootApplication;
import org.springframework.boot.autoconfigure.mongo.MongoAutoConfiguration;
import org.springframework.cloud.client.circuitbreaker.EnableCircuitBreaker;
import org.springframework.cloud.client.discovery.EnableDiscoveryClient;
import org.springframework.cloud.netflix.feign.EnableFeignClients;
import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.EnableAspectJAutoProxy;
import org.springframework.scheduling.annotation.EnableAsync;
/**
 * Created by chencs on 2017/5/26.
 */
@SpringBootApplication(exclude={MongoAutoConfiguration.class})
@EnableDiscoveryClient
@ComponentScan(basePackages={"com.chencs"})
@EnableAspectJAutoProxy
@EnableAsync
@EnableCircuitBreaker
@EnableFeignClients
@MapperScan(basePackages = "com.chencs.*.*")  //如果要使用xml必须加上这句 basePackages 对应mapper xml文件必须跟mapper放在同个目录
public class CommonServiceApplication {

    public static  void main(String[] args) {
        SpringApplication.run(CommonServiceApplication.class);
    }
}

